/**
 * 
 */
package com.vivid.dynamics.oknow.dao;

import java.io.Serializable;

import org.springframework.stereotype.Repository;

import com.vivid.dynamics.oknow.model.Permission;

/**
 *	DAO methods involving the Permission.
 * @author jason
 * created at:: Aug 5, 2011 11:20:52 AM
 */
/*
 * Repository annotation states that this class will have 
 * the Exception Translation facility 
 */
@Repository
public interface IPermissionDAO {
	/**
	 * retrieve the Permission instance by pId.
	 * @param pId
	 * @return
	 * @author jason
	 * created at:: Aug 5, 2011  11:21:36 AM
	 */
	public Permission getPermissionByKey(int pId);
	
	/**
	 * create a new Permission, returning the Key.
	 * @param pPermission
	 * @return
	 * @author jason
	 * created at:: Aug 5, 2011  11:22:22 AM
	 */
	public Serializable newPermission(final Permission pPermission);
	
	/**
	 * update the given pPermission.
	 * @param pPermission
	 * @author jason
	 * created at:: Aug 5, 2011  11:23:13 AM
	 */
	public void updatePermission(final Permission pPermission);
	
	/**
	 * delete the given pPermission.
	 * @param pPermission
	 * @author jason
	 * created at:: Aug 5, 2011  11:23:38 AM
	 */
	public void deletePermission(final Permission pPermission);
}
